import request from '@/utils/request'


// 片区
//获取社区列表
export function getCommunitiesList(params, get_url = false) {
    var url = `/communities`;
    if (get_url) return url;
    return request({
        url: url,
        method: 'get',
        params
    })
}
//获取社区详情
export function detailCommunitiesDetail(params) {
    return request({
        url: '/communities/detail',
        method: 'get',
        params
    })
}

export function communityChangeFiledStatus(data) {
    return request({
        url: '/communities/changeFiledStatus',
        method: 'put',
        data
    });
}

//添加
export function createCom(data) {
    return request({
        url: '/communities/create',
        method: 'post',
        data
    })
}

//修改
export function updateCom(data) {
    return request({
        url: '/communities/update',
        method: 'put',
        data
    })
}

//删除
export function delCom(data) {
    return request({
        url: '/communities/delete',
        method: 'delete',
        data
    })
}
// 水机列表页面
export function getAllCom(params) {
    return request({
        url: '/communities/getSelectLists',
        method: 'get',
        params
    })
}

//获取用户列表
export function usersUnusual(params) {
    return request({
        url: '/water/member/unusual',
        method: 'get',
        params
    })
}



